﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Mvc;
using MySpiderMgr.WebApi.ViewModels;

namespace MySpiderMgr.WebApi.Controllers
{
    //[EnableCors("ViewCors")]
    [Route("api/[controller]")]
    [ApiController]
    public class CommonController : ControllerBase
    {
        [HttpGet]
        public List<MenuItem> Menu()
        {
            List<MenuItem> menuItems = new List<MenuItem> {
                new MenuItem{ Title="人员管理",Url="/",Id=0 },
                new MenuItem{ Title="任务管理",Url="/",Id=1 }
            };
            return menuItems;
        }
    }


}